import { defineStore } from "pinia";
import { getDict } from '@/api/dict';
function initState() {
    return {
        dicts: [],
      
    }
}

export const useDictStore = defineStore("dict",()=>  {
    const state = ref(initState())
    async function initDict(){
      const dictRes= await getDict();
      state.value.dicts=dictRes.data;
    }
    return { state,initDict}
},
{
    persist: false
  })